package hotciv.variants;

import hotciv.common.CityImpl;
import hotciv.framework.City;
import hotciv.framework.CityPopulationStrategy;

public class EtaCityPopulation implements CityPopulationStrategy {

	@Override
	public void calculatePopulation(City c) {
		CityImpl city = (CityImpl) c;
		if (city.getSize()<9 && city.getFoodStock()>5+city.getSize()*3) {
			city.setSize(city.getSize()+1);
			city.setFoodStock(0);
		}
	}

}
